package com.sc.nft.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.ApprovalStatusEnum;
import com.sc.nft.enums.task.ActivityTypeEnum;
import com.sc.nft.enums.task.ParticipantsEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.Date;
import java.util.List;

@Data
public class CollectiveSalesConfigDTO  {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty(value = "藏品Id")
    @NotNull(message = "请选择藏品")
    private Long collectionId;
    @ApiModelProperty(value = "开启上限")
    @NotNull(message = "请输入开启上限")
    @Range(min = 1L,max = 9999L, message = "开启上限需再1-9999之间")
    private Integer openLimit;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @ApiModelProperty(value = "总投入上限")
    @NotNull(message = "请输入总投入上限")
    @Range(min = 1L,max = 99999L, message = "总投入上限需再1-99999之间")
    private Integer sumIntoLimit;
    @ApiModelProperty(value = "投入条件藏品Id")
    private Long intoCollectionId;

    @ApiModelProperty(value = "投入开启时间")
    @NotNull(message = "请选择投入开启时间")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Date startIntoTime;
    @ApiModelProperty(value = "投入结束时间")
    @NotNull(message = "请选择投入结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Date endIntoTime;

    @ApiModelProperty(value = "活动结束时间")
    @NotNull(message = "请选择活动结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Date activityEndTime;
    @ApiModelProperty(value = "服务费比例")
    @NotNull(message = "请输入服务费比例")
    @Range(min = 0L,max = 1L,message = "服务费比例需要再0-1之间")
    private BigDecimal serviceFeeRatio;
    @ApiModelProperty(value = "上链费")
    @NotNull(message = "请输入上链费")
    @Range(min = 1L,max = 100L,message = "上链费需要再1-100之间")
    private BigDecimal gas;
    @ApiModelProperty(value = "规则图片")
    @NotBlank(message = "请上传规则图片")
    private String ruleImage;
    @ApiModelProperty("时间点配置集合")
    @Valid
    @Size(min = 1,max = 10,message = "时间点配置最少1条，最多10条")
    private List<CollectiveSalesTimePointsConfigDTO> timePointsConfigs;
    @ApiModelProperty("权重")
    private Integer sort;

}
